package com.sc.nft.mapper;

import cn.hutool.core.date.DateTime;
import com.sc.nft.dto.AdminShareProfitCollectDetailsDTO;
import com.sc.nft.dto.AdmnTypeSummaryDTO;
import com.sc.nft.dto.MarketValueManagementDaoDTO;
import com.sc.nft.dto.SimpleDigitalGetSeparateFundDTO;
import com.sc.nft.entity.EcologyHatchShareProfit;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 生态-DAO分成记录表(sc_ecology_hatch_share_profit)数据Mapper
 *
 * @author Sun
 * @since 2023-12-06 18:48:04
 * @description 由 Mybatisplus Code Generator 创建
*/
@Mapper
public interface EcologyHatchShareProfitMapper extends BaseMapper<EcologyHatchShareProfit> {

    AdminShareProfitCollectDetailsDTO getSumDistributionPointsGroupTypeByCollectionId(@Param("collectionId") Long collectionId);

    AdminShareProfitCollectDetailsDTO shareProfitCollectDetailsByUserRecordId(@Param("userRecordId") Long userRecordId);

    /**
     * 获取上周分红池
     * @param beginOfWeek
     * @param endOfWeek
     * @return
     */
    BigDecimal getLastWeekBonusPool(@Param("daoId") Long daoId, @Param("type")Integer type, @Param("beginOfWeek") Date beginOfWeek, @Param("endOfWeek") Date endOfWeek);

    /**
     * 获取上个月的市值管理列表dao
     * @param type
     * @param beginMonth
     * @param endMonth
     * @return
     */
    List<MarketValueManagementDaoDTO> getSettleDaoListByTypeAndLastMonth(@Param("type") int type,@Param("beginMonth") DateTime beginMonth, @Param("endMonth") DateTime endMonth);

    /**
     * 获取冻结生态分润记录 todo: AND  create_time &gt;= '2024-08-01'
     * @return
     */
    List<EcologyHatchShareProfit> getFrozenList();

    /**
     * 获取给本dao分过账的数据
     * @param daoId
     * @return
     */
    List<SimpleDigitalGetSeparateFundDTO> getDaoSeparateFund(@Param("daoId") Long daoId);
}
